package ControlLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class Test_AddressCtr.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class Test_AddressCtr
{
    /**
     * Default constructor for test class Test_AddressCtr
     */
    public Test_AddressCtr()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testAddressCtr()
    {
        ControlLayer.AddressCtr addressC1 = new ControlLayer.AddressCtr();
        addressC1.createPerson(1, "peter", "gugvej 5", "9000", "aalborg", "25456874");
        addressC1.createPerson(2, "helle", "petersborgvej", "9000", "aalborg", "9854754");
        addressC1.createPerson(3, "sofie", "aabybrovej", "9710", "aabybro", "1234543");
        addressC1.listAllPersons();
        addressC1.updatePerson(3, "sofie", "aabybro", "9710", "aabybro", "1234546789");
        addressC1.listAllPersons();
        addressC1.listAllPersons();
        addressC1.deletePerson(1);
        addressC1.listAllPersons();
    }
}

